import random
WIDTH = 500
HEIGHT = 600
BACK_COLOR = (0, 0, 50)
wid=20
room=10
arr = [100, 120,140, 160,180, 200]
print(arr)
def draw_rect(x,y,a,b):
    pos=(x,y-b)
    code=(a,b)   
    clr=(b*0.75, b*1.25, b*0.25)
    screen.draw.filled_rect(Rect(pos,code),clr)

def draw():
    global wid,room
    screen.clear()
    screen.fill(BACK_COLOR)
    screen.draw.line((0, HEIGHT / 2), (WIDTH, HEIGHT / 2), (50,30,200))
    for k in range(len(arr)):
        draw_rect(150+k*(room+wid),HEIGHT/2,wid,arr[k])
